#!/usr/bin/env python3
"""
快速测试CORS修复
"""

import requests

def quick_test():
    """快速测试"""
    print("=== 快速CORS测试 ===")
    
    # 测试后端服务
    try:
        response = requests.get('http://localhost:5000/', timeout=3)
        print(f"✅ 后端服务: {response.status_code}")
    except:
        print("❌ 后端服务未运行")
        return
    
    # 测试报表接口
    endpoints = [
        '/api/reports/summary',
        '/api/reports/winning-analysis',
        '/api/reports/prediction-trends'
    ]
    
    for endpoint in endpoints:
        url = f'http://localhost:5000{endpoint}'
        try:
            response = requests.get(url, timeout=3)
            if response.status_code == 200:
                print(f"✅ {endpoint}: 成功")
            else:
                print(f"❌ {endpoint}: {response.status_code}")
        except Exception as e:
            print(f"❌ {endpoint}: {e}")

if __name__ == '__main__':
    quick_test() 